Okay.
So in this video, we're going to continue looking at roadblocks, instances.
And this is going to be all about point lights, spotlights and surface lights, which you'll use a
lot in your games for lighting.
So in order to actually see these lights very well, I'm actually going to go into the lighting service
here and set the time of day to like.
Zero.
There we go.
Now it's nice and dark.
We're at nighttime.
And now with my part here, I.
I'm going to insert what should our first one be?
Let's do a point light.
Why not?
So with our point light, as you can see, it's not doing much.
But if I bring this part down towards the ground, you'll see it actually is slightly illuminated in
the ground.
It's not very bright, though, and that's because our range is quite small and our brightness isn't
that much.
But using the brightness, we can actually increase the intensity of light.
So if I put it to 20, it is very bright now, or if I want it to be very dim, I can put maybe like
0.1.
And this is a very dim light.
It's like it's virtually impossible to see right now, but I'll set it to like maybe five for now.
And then I can change the range of my light.
So maybe instead of eight studs in all directions, maybe I want it to be like 16.
And it's a little bright there in the center.
So I'll tone down the brightness to maybe two.
There we go.
Here's our point light.
It originates from a point, the center point of our part.
And we can change the color of our light.
Maybe we want it to be like an ominous red color.
Spooky.
And of course, we can enable or disable whether or not we want this light to interact with parts to
create shadows.
So if I turn shadows on, that means if I create another part here.
You'll see.
That is causing a shadow here.
Oh.
And we're getting this nice reflectance of a little bit of red into our shadow.
But if I turn shadows off on our part, where is it?
Here we go.
Turn it off.
You'll see.
It just kind of goes right through our part.
The light kind of acts as if this part doesn't exist.
And the reason this is still cast in a shadow is probably because of our moon up there.
But this shadow is coming from the moon.
Let's try Spotlight.
This one's kind of neat.
So with a spotlight, it creates a light that is like a spotlight.
Right now it's pointing in the front direction.
But I can make it go where it's shooting downwards.
And of course, I can change the range of the spotlight.
So let's make it at, like, I don't know, 35 studs.
So now it's shooting out this giant spotlight.
But maybe I want this light to be more concentrated so I can go in here and change the angle and reduce
it to maybe like 40.
And I'll decrease the range a bit back to 30 and then I can increase the intensity of my light.
So maybe I want it to be super bright.
How about ten?
There we go.
Now we have our bright spotlight here.
Cast in a nice light downwards.
You can see this nice little image of what our spotlight looks like.
And of course, I can also change the color here to maybe we'll make it a nice blue color.
And of course, we can change whether or not we'd like this to respect shadows.
So if I turn it on.
You'll see that it is reflected in the top.
And it's more dim down here because there's only a little bit of light spillover coming from the sides.
But if I turn it off, you'll see it doesn't care that the part is there.
It will go straight through.
Now, you kind of noticed that this shadow option isn't affecting much and it's mostly prominent.
You'll actually be able to see the most out of the sliding.
If we switch the technology to future.
And as you can see, this is much more realistic lighting.
And now with shadows on it is respecting this part and no light is bleeding through.
So this is a much better demonstration of the shadow property here.
I'm using future lighting, which is a more realistic lighting, technology and robotics.
And as you can see, if I have shadows off light passes straight through this object, but if I turn
it on, it respects this object.
And actually you can see a clean cut right through the center of this light.
So that's just kind of the difference between shadows on and shadows off.
And the last letter I want to show here is called a surface Light.
And this produces light emanating directly from whichever surface of the part.
So imagine this entire face of the part shooting off light.
So if I put this on the bottom and I increase the brightness to five and increase the range to like.
40?
No, 30?
Sure.
Something like that.
Super bright.
It is shooting light out in all directions from this entire face of the part.
And of course, if I turn on shadows, it respects this part here and blocks out light.
But this is kind of the difference between a spotlight and a surface light.
So while a spotlight shines out, light from a point a surface light shines out light from an entire
surface of a part.
Now, the cool thing with point lights and spotlights is that you can put them in attachments.
So this attachment here that belongs to this part, I can put like a spotlight in here.
And put it in the bottom.
And now I can independently change the location of my spotlight.
So instead of it being directly in the center of my part, I can use this attachment and kind of switch
up wherever I want my spotlight to be.
So here's my spotlight moving around.
Or I can do it with a point light.
So if I put a point light in here.
Now I can change around where my point light is located.
And remember, this light still belongs to this part here.
So if I move this part around, you can see still belongs to the part, but the attachment just gives
you a little bit more freedom on where you want to put your light in your game.